package com.loto.insurance.oem.web.service;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.loto.insurance.oem.web.db.mapper.CustFeeInitMapper;
import com.loto.insurance.oem.web.entity.CustFeeInit;

@Service
public class CustFeeInitService {

  @Autowired
  CustFeeInitMapper custFeeInitMapper;

  public CustFeeInit findInitByOutPayNo(String initOutPayNo) {
	return custFeeInitMapper.findInitByOutPayNo(initOutPayNo);
  }

  public int updateFlagByOutPayNo(String initOutPayNo, Date initCreditedOn,
	  String initPayNo) {
	Map<String, Object> params = new HashMap<String, Object>();
	params.put("initOutPayNo", initOutPayNo);
	params.put("initCreditedOn", initCreditedOn);
	params.put("initPayNo", initPayNo);
	return custFeeInitMapper.updateFlagByOutPayNo(params);
  }
}
